#!/bin/bash
#20180111
pkill -9 yum
pkill -9 freshclam
pkill -9 clamscan
yum update clamav -y -q
path='/var/www/virtual/CLAMAV_VIRUS/log/'
[ -d "$path" ] || mkdir -p "$path"
nowtime=`date +%Y-%m-%d-%H`
freshclam --quiet
clamscan  -ir -l /var/www/virtual/CLAMAV_VIRUS/log/clamav.log-$nowtime / --bytecode=yes  --move=/var/www/virtual/CLAMAV_VIRUS --exclude-dir=/moban/ --exclude-dir=/var/www/virtual/CLAMAV_VIRUS/ --exclude-dir=/proc/ --exclude-dir=/sys/ --exclude-dir=/var/log/  --exclude-dir=/var/spool --exclude-dir=/dev/ --exclude-dir=/var/www/virtual/./home/logs/ --scan-pe=no --scan-archive=no --scan-swf=no --scan-pdf=no  --quiet
find $path/../ -mtime +90  -exec rm -f {} \;
rm -fr /var/lib/clamav/*.tmp
